home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3748 < prev    next >
Encoding:
Text File  |  1996-08-06  |  909 b   |  40 lines

  1. Path: mars.efn.org!rose_ip179
  2. From: peterf@gears.efn.org
  3. Newsgroups: comp.lang.c++
  4. Subject: re: I need Help!
  5. Date: Thu, 25 Jan 96 17:26:04 GMT
  6. Organization: Oregon Public Networking
  7. Message-ID: <4e8oll$c3i@mars.efn.org>
  8. NNTP-Posting-Host: rose_ip179.efn.org
  9. X-Newsreader: News Xpress Version 1.0 Beta #3
  10.  
  11. Dear Jeremy,
  12.  
  13. Let me rewrite this so it works....
  14.  
  15.     void main(void)
  16.      {
  17.       char chr;
  18.       chr = getche(); 
  19.       if(chr=='q') 
  20.       goto b;
  21.  
  22.       b: 
  23.       cout << "it worked";
  24.      }
  25.  
  26. There you go, this should work.  I cant remember but I think if you dont have 
  27. a void in front of main then it wants to return something.  Aslo if you 
  28. noticed I reworked your program in C++ format rather than C.  Try using C++ 
  29. from now on, because as I have found it C++ is cleaner and has less 
  30. complicated syntax than C.
  31.  
  32. Your Friend,
  33.  
  34. Peter Felten
  35. peterf@gears.efn.org
  36. peterf@rosenet.net
  37.     
  38.     
  39.    
  40.